<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
    <meta content="telephone=no" name="format-detection" />
    <title>忘记密码</title>
    <link href="{{ static('css/main.css') }}" rel="stylesheet" type="text/css">
    <link href="{{ static('css/style.css') }}" rel="stylesheet" type="text/css">
    <link href="{{ static('css/shake.css') }}" rel="stylesheet" type="text/css">
    <link href="{{ static('css/font-awesome.min.css') }}" rel="stylesheet" type="text/css">
    <link href="{{ static('css/animate.min.css') }}" rel="stylesheet" type="text/css">
    <link href="{{ static('css/idangerous.swiper.css') }}" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="{{ static('js/jquery-1.8.3.min.js') }}"></script>
    <script type="text/javascript" src="{{ static('js/wo.js') }}"></script>
</head>
<body style="background-color: #fff !important;">
<div class="warpe">
    <div class="head">
        <a href="{{ url('index:password') }}" class="return"><i class="icon-chevron-left"></i> 返回</a>
        忘记密码
    </div>
    <div class="main">
        <div class="regall">
            <div class="regTxt">
{#                <span id="tel">1370830627</span>#}
                <p class="color_r" >验证码已发送到<span id="tel">13285173126</span>的手机上</p>
            </div>
            <div class="reginput">
                <input type="text" placeholder="短信验证码" id="message">
                <div class="yzmdiv">
                    <a href="#">获取验证码</a>
                </div>
            </div>
            <div class="regTxt">
                
            </div>
            <div class="id_bth inersest_bth animated bounceIn">
                <a href="#" id="wang">下一步</a>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    {#$(function() {#}
    {##}
    {#    var tel = $('#tel').html();#}
    {##}
    {#    var mtel = tel.substr(0, 3) + '****' + tel.substr(7);#}
    {#    $('#tel').text(mtel);#}


    $('#wang').click(function (e) {
        var code = document.getElementById("message").value;
        $.ajax({
            url: '/password2/',
            data: {
                'code': code,
            },
            type: 'POST',

            success: function(data){
                if (data.errno == '0') {
                    // 登录成功跳转到首页
                    alert(22222);
                    window.location.href = "{{ url('index:password3') }}";
                } else {
                    alert(data.errmsg)
                }
            }
        })
    })

</script>
</body>
</html>